package com.example.study_thread.thread;

public class ThreadClass extends Thread {
    @Override
    public void run() {
        super.run();
        for (int i = 0; i < 50; i++) {
            try {
                Thread.sleep(1000L);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            System.out.println("MyThread中线程" + getName() + "---->" + Thread.currentThread().getName() + "执行了i次:" + i);
        }
    }
}
